package aspect;

import org.aspectj.lang.ProceedingJoinPoint;

public class LogAspect {
	public void logBefore(){
		System.out.println("log before ....");
	}
	public void logAfter(){
		System.out.println("log after ....");
	}
	public Object logAround(ProceedingJoinPoint point) {
		String s = (String)point.getArgs()[0];
		Object o = null;
		System.out.println("log around before ...");
		
			try {
				//o = point.proceed();
				//o = point.proceed(new Object[]{"TOm"});
				o = point.proceed(new Object[]{s.toUpperCase()});
			} catch (Throwable e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
	
		System.out.println("log around after ...");
		return o;
	}
}
